home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
dev
/
misc
/
Hunk.lha
/
Hunk
/
Hoppers
/
General.hop
< prev
next >
Wrap
Text File
|
1998-02-14
|
3KB
|
141 lines
;*************************************************************************
;** General Optimizer PC Absolute to Relative **
;** Contributor: Thomas Richter (thor) Nov 1st 1997 **
;** Modify all absolute addressing to PC relative if possible **
;*************************************************************************
;*************************************************************************
;
; MOVE.L
;
#match
#code
%0010XXXXXX111001 =# SourceEA ;MOVE.L ABS,rx
RRRR RRRR =@ EA
;
;
#replace
%0010XXXXXX111010 =# SourceEA ;MOVE.L d(PC),rx
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; MOVE.W
;
#match
#code
%0011XXXXXX111001 =# SourceEA ;MOVE.W ABS,rx
RRRR RRRR =@ EA
;
;
#replace
%0011XXXXXX111010 =# SourceEA ;MOVE.W d(PC),rx
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; MOVE.B
;
#match
#code
%0001XXXXXX111001 =# SourceEA ;MOVE.L ABS,rx
RRRR RRRR =@ EA
;
;
#replace
%0001XXXXXX111010 =# SourceEA ;MOVE.L d(PC),rx
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; MOVE.L #???,Ax -> LEA
;
#match
#code
%0010XXX001111100 =# SourceEA ;MOVE.L #ABS,Ax
RRRR RRRR =@ EA
;
;
#replace
%0100XXX111111010 =# SourceEA ;LEA d(PC),Ax
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; JMP Abs
;
#match
#code
4EF9 ; JMP Abs.L
RRRR RRRR =@ EA
;
;
#replace
4EFA ; JMP d(PC)
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; JSR Abs
;
#match
#code
4EB9 ; JSR Abs.L
RRRR RRRR =@ EA
;
;
#replace
4EBA ; JSR d(PC)
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; PEA Abs
;
#match
#code
4879 ; PEA Abs.L
RRRR RRRR =@ EA
;
;
#replace
487A ; PEA d(PC)
YYYY =@ EA
4E71
#end
;*************************************************************************
;
; LEA Abs
;
#match
#code
%0100XXX111111001 =# SourceEA ; LEA Abs.l,Ax
RRRR RRRR =@ EA
;
;
#replace
%0100XXX111111010 =# SourceEA ; LEA d(PC),Ax
YYYY =@ EA
4E71
#end